package com.wnx.action;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.wnx.entity.Admin;
import com.wnx.entity.Menu;
import com.wnx.service.FirstService;
import com.wnx.service.SaleService;

public class FirstAction  extends ActionSupport{
	private Admin admin;

	public Admin getAdmin() {
		return admin;
	}

	public void setAdmin(Admin admin) {
		this.admin = admin;
	}
	public String execute() throws Exception{
		FirstService fs = new FirstService();
		List<Admin> list = fs.getadminAll();
		Map<String, Object> session = ActionContext.getContext().getSession();
		session.put("list", list);
		return SUCCESS;
	}
}
